<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false"%>
<!DOCTYPE html>
<html>
<head>
    <title>Title</title>
<%--    <link type="text/css" rel="stylesheet" href="/BhSyCase/css/Teacher03.css">--%>
    <script src="/BhSyCase/js/Teacher03.js"></script>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        .inStu{
            z-index: 1;
            cursor: pointer;
            position: absolute;
            width: 15%;
            height: 5%;
            left: 40%;
            top: 85%;
            border: rgba(234, 234, 234, 0.76);
            background-color: cadetblue;
            border-radius: 20px;
            font-size: 15px;
            color: white;
        }

        a{
            text-decoration:none;
            color: #0C0C0C;
            font-family: "Agency FB";
        }
        .mydiv{
            width: 500px;
            height: 350px;
            background: white;
            border:1px solid black;
            position:absolute;
            left:50%;
            top:50%;
            margin-left:-200px;
            margin-top:-150px;
            display:none;
        }
        .mydiv2{
            width: 500px;
            height: 350px;
            background: white;
            border:1px solid black;
            position:absolute;
            left:50%;
            top:50%;
            margin-left:-200px;
            margin-top:-150px;
            display:none;
        }

        .s_class{
            margin-left: 5%;
            margin-top: 10%;
        }
        .s_id{
            margin-left: 6%;
            margin-top: 4%;
        }
        .s_name{
            margin-left: 5%;
            margin-top: 4%;
        }
        .s_img{
            margin-left: 5%;
            margin-top: 4%;
        }
        .s_system{
            margin-left: 5%;
            margin-top: 4%;
        }
        .gb{
            margin-left: 90%;
        }
        .gb2{
            margin-left: 90%;
        }

        .t_class{
            margin-left: 24%;
        }

        .t_id{
            margin-left: 24%;
        }
        .t_name{
            margin-left: 24%;
        }
        .t_img{
            margin-left: 24%;
        }
        .t_system{
            margin-left: 24%;
        }

        table.dataintable {
            margin-top:15px;
            border-collapse:collapse;
            border:1px solid #aaa;
            width:100%;

        }

        table.dataintable th {
            vertical-align:baseline;
            padding:5px 15px 5px 6px;
            background-color:#3F3F3F;
            border:1px solid #3F3F3F;
            text-align:left;
            color:#fff;
        }

        table.dataintable td {
            vertical-align:text-top;
            padding:6px 15px 6px 6px;
            border:1px solid #aaa;
        }

        table.dataintable tr:nth-child(odd) {
            background-color:#F5F5F5;
        }

        table.dataintable tr:nth-child(even) {
            background-color:#fff;
        }
        #Dx{
            width: 70%;
            height: 800px;
            margin:0 auto;
        }


    </style>
</head>
<body>
    <h2 style="text-align: center">学生信息</h2>
    <button class="inStu" onclick="showadd()">添加学生</button>
    <div id = "Dx">
        <table class="dataintable">
            <tr>
                <th>班级</th>
                <th>id</th>
                <th>姓名</th>
<%--                <th>头像</th>--%>
                <th>权限</th>
                <th>修改信息</th>
                <th>删除信息</th>
            </tr>

            <c:forEach items="${stud}" var="stu">
                <tr>
                    <td>${stu.getuClass()}</td>
                    <td>${stu.getuID()}</td>
                    <td>${stu.getuName()}</td>
<%--                    <td>${stu.getuImg()}</td>--%>
                    <td>${stu.getuSystem()}</td>
                    <td><a class="xg" href="#${stu.getuID()}">[修改]</a></td>
                    <td><a href="../UserTopic/Teacher03_del?uid=${stu.uID}">[删除]</a></td>
                </tr>

            </c:forEach>

        </table>
        <!--- 分页-->
        <a href="../UserTopic/Teacher03_Page?p=1">首页</a>
        <c:if test="${pb.curpage>1}">
            <a href="../UserTopic/Teacher03_Page?p=${pb.curpage-1}">上一页</a>
        </c:if>
        &nbsp;
        <c:forEach begin="${pb.begin}" end="${pb.end}" var="k">
            <c:set var="p" value="${k==pb.curpage?'cur':''}"></c:set>
            <a class="${p}" href="../UserTopic/Teacher03_Page?p=${k}">${k}</a>
            &nbsp;
        </c:forEach>
        &nbsp;
        <c:if test="${pb.curpage!=pb.pages}">
            <a href="../UserTopic/Teacher03_Page?p=${pb.curpage+1}">下一页</a>
        </c:if>
        &nbsp;
        <a href="../UserTopic/Teacher03_Page?p=${pb.pages}">尾页</a>
    </div>

    <div class="mydiv">

        <form class="mymf" action="../UserTopic/Teacher03_up" method="post" id = "xg_fk">

            <a class='gb' href="#">[关闭]</a>

            <span class="t_class">班级:</span>
            <input type="text" name="upuClass" class="s_class"/><br/>

            <span class="t_id">id :</span>
            <input type="text" name="upuID" class="s_id" readonly = "readonly"/><br/>

            <span class="t_name">姓名:</span>
            <input type="text" name="upuName" class="s_name"/><br/>

<%--            <span class="t_img">头像:</span>--%>
<%--            <input type="text" name="upuImg" class="s_img"/><br/>--%>

            <span class="t_system">权限:</span>
            <input type="text" name="upuSystem" class="s_system" readonly = "readonly"/><br/>

            <input type="submit"  value="修改" class="inStu" />

        </form>
    </div>

    <div class="mydiv2">
        <form class="mymf" action="../UserTopic/Teacher03_in" method="post" id = "tj_fk">
            <a class='gb2' href="#">[关闭]</a>

            <span class="t_class">班级:</span>
            <input type="text" name="upuClass" class="s_class" id = "t_class"/><br/>
            <span id = "t_class_bc" style="display: block;color: red;    margin-left: 44%;"></span>

            <span class="t_id">id :</span>
            <input type="text" name="upuID" class="s_id" readonly = "readonly" /><br/>

            <span class="t_name">姓名:</span>
            <input type="text" name="upuName" class="s_name" id = "t_name"/><br/>
            <span id = "t_name_bc" style="display: block;color: red;    margin-left: 44%;"></span>

<%--            <span class="t_img">头像:</span>--%>
<%--            <input type="text" name="upuImg" class="s_img"/>--%>
<%--            <button></button><br/>--%>

            <span class="t_system">权限:</span>
            <input type="text" name="upuSystem" class="s_system" value="1" readonly = "readonly"/><br/>
            <span id = "t_system_bc"></span>

            <input type="submit"  value="增加" class="inStu" />

        </form>
    </div>

</body>
</html>
